package com.itheima.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.RoleDao;
import com.itheima.pojo.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 角色服务
 */
@Service(interfaceClass = RoleService.class)
@Transactional
public class RoleServiceImpl implements RoleService {

    //注入DAO
    @Autowired
    private RoleDao roleDao;

    //查询角色信息
    @Override
    public List<Role> findAll() {
        return roleDao.findAll();
    }
}
